﻿namespace MEF_Test.Formats.Avi
{
    using System.ComponentModel.Composition;

    using MEF_Test.Contracts;

    [Export(typeof(IMediaHandlerFactory))]
    [ExportMetadata("ContentType", "video/avi")]
    [ExportMetadata("Extension", ".avi")]
    public class AviMediaHandlerFactory : IMediaHandlerFactory
    {
        /// <summary>
        /// Creates the specified media handler.
        /// </summary>
        /// <param name="fileHandler">The file handler.</param>
        /// <returns>An instance of an <see cref="IMediaHandler"/>.</returns>
        public IMediaHandler Create(IFileHandler fileHandler)
        {
            return new AviMediaHandler(fileHandler);
        }
    }
}